import request from '@/utils/request'
import upload from '@/utils/upload'

export function getOpenId(data) {
  return request({
    url: '/WjjwApi/getOpenidFromCode',
	headers: {
	  isToken: false
	},
    method: 'post',
    data: data
  })
}
export function ifRegister(data) {
  return request({
    url: '/WjjwApi/ifRegister',
	headers: {
	  isToken: false
	},
    method: 'post',
    data: data
  })
}
export function WjRegister(data) {
  return request({
    url: '/WjjwApi/WjRegister',
	headers: {
	  isToken: false
	},
    method: 'post',
    data: data
  })
}


export function getUserByOpenId(data) {
  return request({
    url: '/WjjwApi/getUserMsg',
	headers: {
	  isToken: false
	},
    method: 'post',
    data: data
  })
}

export function getRecord(data) {
  return request({
    url: '/WjjwApi/getRecord',
    headers: {
	  isToken: false
	},
    method: 'post',
    data: data
  })
}	


export function saveKaRecord(data) {
  return request({
    url: '/WjjwApi/saveKaRecord',
	headers: {
	  isToken: false
	},
    method: 'post',
    data: data
  })
}

export function getXcxConfig(data) {
  return request({
    url: '/WjjwApi/getXcxConfig',
	headers: {
	  isToken: false
	},
    method: 'post',
    data: data
  })
}
export function getPicMsgById(data) {
  return request({
    url: '/WjjwApi/getPicMsgById',
	headers: {
	  isToken: false
	},
    method: 'post',
    data: data
  })
}



// 用户头像上传
export function uploadAvatar(data) {
  return upload({
    url: '/WjjwApi/avatar',
	headers: {
	  isToken: false
	},
    name: data.name,
    filePath: data.filePath
  })
}

// 用户头像上传
export function updateUser(data) {
  return request({
    url: '/WjjwApi/updateUser',
  	headers: {
  	  isToken: false
  	},
    method: 'post',
    data: data
  })
}

//获取单位信息
export function getGroupList() {
  return request({
    url: '/WjjwApi/getGroupList',
  	headers: {
  	  isToken: false
  	},
    method: 'post'
  })
}


//获取危化品目录
export function getWhyList(data) {
  return request({
    url: '/WjjwApi/getWhyList',
  	headers: {
  	  isToken: false
  	},
    method: 'post',
	data: data
  })
}
//获取危化品检查内容
export function getWhyChkMsg(data) {
  return request({
    url: '/WjjwApi/getWhyChkMsg',
  	headers: {
  	  isToken: false
  	},
    method: 'post',
	data: data
  })
}
//获取危化品检查步骤
export function getWhypCheck(data) {
  return request({
    url: '/WjjwApi/getWhypCheck',
  	headers: {
  	  isToken: false
  	},
    method: 'post',
	data: data
  })
}
//保存危化品检查内容
export function saveWhypChk(data) {
  return request({
    url: '/WjjwApi/saveWhypChk',
  	headers: {
  	  isToken: false
  	},
    method: 'post',
	data: data
  })
}

